package com.cn.redis2.dao;

import java.util.concurrent.TimeUnit;

import org.springframework.stereotype.Repository;

@Repository
public class DefaultRedisDao<K,V> extends BaseRedisDao<K, V>{
	/**
	 * 
	 * @param key
	 * @param value
	 * @param expire
	 * @return
	 */
	public void set(final K key, final V value, final long expire) {
		valueOperations.set(key, value,expire,TimeUnit.SECONDS);
	}
	
	/**
	 * get value
	 * 
	 * @param key
	 * @return
	 */
	public V get(final K key) {
		return valueOperations.get(key);
	}
	
}
